<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<script type="text/javascript">

//  arr = [10,75,44,32,30,7];

// function bubble_sort(arr){
// 	for (var i = 0; i <arr.length-1; i++) {
	
//   for (var j = 0; j < arr.length-1; j++) {
//   	if (arr[i]<arr[i+1]) {
//   		heha = arr[i+1];
//   		arr[i+1]=arr[i];
//   		arr[i]=heha;
//   	}
//   }
//   }
// return arr;
// }

// var array_max = bubble_sort(arr)	
// document.write(array_max);



arr = [10,75,44,32,30,7]


function bubble_sort(arr){

	for(i=0, len=arr.length; i<len-1; i++){
                    for(j=0; j<len-i-1; j++){

                    	if(arr[j] > arr[j+1]){
                hah = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = hah;
                    	}


                    } 
       
	}
	return arr;
}
var array_max = bubble_sort(arr)	
document.write(array_max);



	</script>
</head>
<body>
	
</body>
</html>